//package com.wave.traffic.listener;
//
//import com.wave.traffic.task.HKCameraTask;
//import com.wave.traffic.task.NetControllerTask;
//import com.wave.traffic.task.ServerInfo;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.context.event.ApplicationReadyEvent;
//import org.springframework.context.ApplicationListener;
//import org.springframework.stereotype.Component;
//
///***
// * @Description 交通灯服务启动监听器
// * @Author chenjian
// * @Date 2022/9/15 10:01
// */
//@Component
//public class TrafficApplicationListener implements ApplicationListener<ApplicationReadyEvent> {
//
//
//    @Autowired
//    private ServerInfo serverInfo;
//
//    @Override
//    public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) {
//        // 启动网络控制器1任务
//        NetControllerTask netController1Task = new NetControllerTask(serverInfo.getServerIP1(), serverInfo.getServerPort1(), serverInfo);
//        netController1Task.setName("netController213");
//        netController1Task.start();
//        // 启动网络控制器2任务
//        NetControllerTask netController2Task = new NetControllerTask(serverInfo.getServerIP2(), serverInfo.getServerPort2(), serverInfo);
//        netController2Task.setName("netController212");
//        netController2Task.start();
//        // 启动网络控制器3任务
//        NetControllerTask netController3Task = new NetControllerTask(serverInfo.getServerIP3(), serverInfo.getServerPort3(), serverInfo);
//        netController3Task.setName("netController215");
//        netController3Task.start();
//        // 启动雷视摄像机监控任务
//        HKCameraTask cameraTask = new HKCameraTask(serverInfo);
//        cameraTask.setName("cameraTask");
//        cameraTask.start();
//    }
//}
